setUpBeforeClass{
  StaticHandler.addDelegate(new JPAHandler());
  StaticHandler.addDelegate(new RepoHandler());
  StaticHandler.addDelegate(new Handler(){
    @Override public void beforeBeanDiscovery(    BeforeBeanDiscovery bbd,    BeanManager bm){
      bbd.addAnnotatedType(bm.createAnnotatedType(BarPlugin.class));
      bbd.addAnnotatedType(bm.createAnnotatedType(BarPlugin.BarValidation.class));
    @Override public void afterDeploymentValidation(    AfterDeploymentValidation adv,    BeanManager bm){
      manage(BarPlugin.class);
    @Override public void beforeShutdown(    BeforeShutdown adv,    BeanManager bm){
  server=new Server();
  Set<Bean<?>> beans=server.getBeanManager().getBeans(BarPlugin.class,new AnnotationLiteral<Any>(){
    Bean<?> bean=beans.iterator().next();
    barPlugin=(BarPlugin)server.getBeanManager().getReference(bean,BarPlugin.class,server.getBeanManager().createCreationalContext(bean));
}
beforeBeanDiscovery{
  bbd.addAnnotatedType(bm.createAnnotatedType(BarPlugin.class));
  bbd.addAnnotatedType(bm.createAnnotatedType(BarPlugin.BarValidation.class));
}
afterDeploymentValidation{
  manage(BarPlugin.class);
}
beforeShutdown{ }
tearDownAfterClass{
  server.stop();
}
testPlugin{ }
testMimeType{
}
testMimeMatching{
  assertNotNull(dh);
  assertNotNull(dh);
  assertEquals(BarPlugin.FOO_MIMETYPE,dh.getContentType());
}
testCommand{
  CommandInfo ci=dh.getCommand("validate");
  assertNotNull(ci);
  Object o=dh.getBean(ci);
  assertTrue(o instanceof BarPlugin.BarValidation);
  BarPlugin.BarValidation val=(BarPlugin.BarValidation)o;
  assertTrue(val.validate(null));
}
testCreate{
  Repository repo=barPlugin.getRepository();
  BarPlugin.Bar bar=new BarPlugin.Bar("Baz");
}
testRead{
  assertNotNull(repo);
  bar.setPayload("Foo");
  assertNotNull(bar);
  assertEquals("Foo",bar.getPayload());
}
